package edu.jmu.domain;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

public class News implements Serializable {
    private int id; //文章id
    private String title; //标题
    private String summaryInfo; //摘要
    private String body; //正文
    private String writer; //作者
    @JsonFormat(pattern = "yyyy-MM-dd : HH:mm:ss")
    private Date releaseDate; //发布日期
    private String releaseStatus;//是否发布了

    public String getReleaseStatus() {
        return releaseStatus;
    }

    public void setReleaseStatus(String releaseStatus) {
        this.releaseStatus = releaseStatus;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSummaryInfo() {
        return summaryInfo;
    }

    public void setSummaryInfo(String summaryInfo) {
        this.summaryInfo = summaryInfo;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getWriter() {
        return writer;
    }

    public void setWriter(String writer) {
        this.writer = writer;
    }

    @JsonFormat(pattern = "yyyy-MM-dd : HH:mm:ss",timezone = "GMT+8")
    public Date getReleaseDate() {
        return releaseDate;
    }

    public void setReleaseDate(Date releaseDate) {
        this.releaseDate = releaseDate;
    }

    @Override
    public String toString() {
        return "News{" + "id=" + id + ", title='" + title + '\'' + ", summaryInfo='" + summaryInfo + '\'' + ", body='" + body + '\'' + ", writer='" + writer + '\'' + ", releaseDate=" + releaseDate + ", releaseStatus='" + releaseStatus + '\'' + '}';
    }
}
